---
title: bud.fs
description: Work with the filesystem
sidebar_label: bud.fs
tags:
  - configuration
  - filesystem
---

**bud.fs** is a collection of utilities to help with common filesystem based tasks.

All **bud.fs** functions take paths relative to the project's root directory. You can also create new instances with
a different context using `bud.fs.make`. This is useful for code readability if you need to do several tasks on files in a shared, non-root directory:

```typescript
const source = bud.fs.make(bud.path(`@src`)) // make a new bud.fs instance with a root in `src`
await source.copy(`foo`, `bar`) // copy src/foo to src/bar
await source.write(`hello.txt`, `hello world`) // write `hello world` to src/hello.txt
```

## bud.fs.json

Utilities for reading and writing json. See [bud.fs.json documentation](/reference/bud.fs/yml) for more information.

## bud.fs.yml

Utilities for reading and writing yml. See [bud.fs.yml documentation](/reference/bud.fs/yml) for more information.

## bud.fs.s3

**bud.fs** includes built-in support for working with remote files stored in S3.

Once installed, you can set your credentials and bucket name in your bud configuration and do uploads:

```typescript
bud.fs
  .setCredentials({accessKeyId: `***`, secretAccessKey: `***`})
  .setEndpoint(`https://sfo2.digitaloceanspaces.com`)
  .setBucket('my-bucket')
  .upload()
```

[See bud.fs.s3 documentation](/reference/bud.fs/s3) for more information on how to use these features.
